package com.example.healthmanagement.controller;


import com.example.healthmanagement.entity.Bmi;
import com.example.healthmanagement.service.BmiService;
import com.example.healthmanagement.service.CookBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/bmi")
public class BmiController {
    @Autowired
    BmiService bmiService;

    @GetMapping("")
    public List<Bmi> getAll() {
        return bmiService.findAll();
    }
}
